home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
NeXTSTEP 3.3 (Developer)…68k, x86, SPARC, PA-RISC]
/
NeXTSTEP 3.3 Dev Intel.iso
/
NextDeveloper
/
Source
/
GNU
/
cctools
/
Makefile
Wrap
Makefile
|
1995-02-05
|
5KB
|
165 lines
SUBDIRS = libstuff as gprof include misc ld dyld libdyld \
mkshlib otool RelNotes man
GNUSRC = /NextDeveloper/Source/GNU
all clean:
@if [ $(SRCROOT) ]; \
then \
CWD=`pwd`; cd $(DSTROOT); DSTROOT=`pwd`; cd $$CWD; \
for i in `echo $(SUBDIRS)`; \
do \
echo =========== make $@ for $$i =============; \
(cd $$i; $(MAKE) RC_CFLAGS="$(RC_CFLAGS)" \
RC_ARCHS="$(RC_ARCHS)" \
DSTROOT=$$DSTROOT \
SRCROOT=$(SRCROOT)/$$i \
OBJROOT=$(OBJROOT)/$$i \
SYMROOT=$(SYMROOT)/$$i $@); \
done \
else \
CWD=`pwd`; cd $(DSTROOT); DSTROOT=`pwd`; cd $$CWD; \
for i in `echo $(SUBDIRS)`; \
do \
echo =========== make $@ for $$i =============; \
(cd $$i; $(MAKE) RC_CFLAGS="$(RC_CFLAGS)" \
RC_ARCHS="$(RC_ARCHS)" \
DSTROOT=$$DSTROOT $@); \
done \
fi
install:
@if [ $(SRCROOT) ]; \
then \
CWD=`pwd`; cd $(DSTROOT); DSTROOT=`pwd`; cd $$CWD; \
for i in `echo $(SUBDIRS)`; \
do \
echo =========== make $@ for $$i =============; \
(cd $$i; $(MAKE) RC_CFLAGS="$(RC_CFLAGS)" \
RC_ARCHS="$(RC_ARCHS)" \
DSTROOT=$$DSTROOT \
SRCROOT=$(SRCROOT)/$$i \
OBJROOT=$(OBJROOT)/$$i \
SYMROOT=$(SYMROOT)/$$i $@); \
done; \
if [ $(RC_RELEASE) ]; \
then \
CWD=`pwd`; cd $(DSTROOT); DSTROOT=`pwd`; cd $$CWD; \
for i in `echo $(SUBDIRS)`; \
do \
echo ===== make shlib_clean for $$i ==========; \
(cd $$i; $(MAKE) RC_CFLAGS="$(RC_CFLAGS)" \
RC_ARCHS="$(RC_ARCHS)" \
DSTROOT=$$DSTROOT \
SRCROOT=$(SRCROOT)/$$i \
OBJROOT=$(OBJROOT)/$$i \
SYMROOT=$(SYMROOT)/$$i shlib_clean); \
done \
fi \
else \
CWD=`pwd`; cd $(DSTROOT); DSTROOT=`pwd`; cd $$CWD; \
for i in `echo $(SUBDIRS)`; \
do \
echo =========== make $@ for $$i =============; \
(cd $$i; $(MAKE) RC_CFLAGS="$(RC_CFLAGS)" \
RC_ARCHS="$(RC_ARCHS)" \
DSTROOT=$$DSTROOT $@); \
done \
fi
make installGNUsrc SRCROOT=$(DSTROOT)/$(GNUSRC)/cctools
chown -fR root.wheel $(DSTROOT)/$(GNUSRC)
lib_ofiles:
@if [ $(SRCROOT) ]; \
then \
CWD=`pwd`; cd $(DSTROOT); DSTROOT=`pwd`; cd $$CWD; \
echo =========== make all for libstuff =============; \
(cd libstuff; $(MAKE) RC_CFLAGS="$(RC_CFLAGS)" \
RC_ARCHS="$(RC_ARCHS)" \
DSTROOT=$$DSTROOT \
SRCROOT=$(SRCROOT)/libstuff \
OBJROOT=$(OBJROOT)/libstuff \
SYMROOT=$(SYMROOT)/libstuff all); \
echo =========== make lib_ofiles for ld =============; \
(cd ld; $(MAKE) RC_CFLAGS="$(RC_CFLAGS)" \
RC_ARCHS="$(RC_ARCHS)" \
DSTROOT=$$DSTROOT \
SRCROOT=$(SRCROOT)/ld \
OBJROOT=$(OBJROOT)/ld \
SYMROOT=$(SYMROOT)/ld lib_ofiles); \
echo =========== make lib_ofiles for libdyld =============; \
(cd libdyld; $(MAKE) RC_CFLAGS="$(RC_CFLAGS)" \
RC_ARCHS="$(RC_ARCHS)" \
DSTROOT=$$DSTROOT \
SRCROOT=$(SRCROOT)/libdyld \
OBJROOT=$(OBJROOT)/libdyld \
SYMROOT=$(SYMROOT)/libdyld lib_ofiles); \
else \
CWD=`pwd`; cd $(DSTROOT); DSTROOT=`pwd`; cd $$CWD; \
echo =========== make all for libstuff =============; \
(cd libstuff; $(MAKE) RC_CFLAGS="$(RC_CFLAGS)" \
RC_ARCHS="$(RC_ARCHS)" \
DSTROOT=$$DSTROOT all); \
echo =========== make lib_ofiles for ld =============; \
(cd ld; $(MAKE) RC_CFLAGS="$(RC_CFLAGS)" \
RC_ARCHS="$(RC_ARCHS)" \
DSTROOT=$$DSTROOT lib_ofiles); \
echo =========== make lib_ofiles for libdyld =============; \
(cd libdyld; $(MAKE) RC_CFLAGS="$(RC_CFLAGS)" \
RC_ARCHS="$(RC_ARCHS)" \
DSTROOT=$$DSTROOT lib_ofiles); \
fi
fromGNUsrc:
@if [ $(SRCROOT) ]; \
then \
CWD=`pwd`; cd $(DSTROOT); DSTROOT=`pwd`; cd $$CWD; \
echo =========== make fromGNUsrc for libstuff =============;\
(cd libstuff; $(MAKE) RC_CFLAGS="$(RC_CFLAGS)" \
RC_ARCHS="$(RC_ARCHS)" \
DSTROOT=$$DSTROOT \
SRCROOT=$(SRCROOT)/libstuff \
OBJROOT=$(OBJROOT)/libstuff \
SYMROOT=$(SYMROOT)/libstuff fromGNUsrc); \
echo =========== make all for as =============; \
(cd as; $(MAKE) RC_CFLAGS="$(RC_CFLAGS)" \
RC_ARCHS="$(RC_ARCHS)" \
DSTROOT=$$DSTROOT \
SRCROOT=$(SRCROOT)/as \
OBJROOT=$(OBJROOT)/as \
SYMROOT=$(SYMROOT)/as all); \
else \
CWD=`pwd`; cd $(DSTROOT); DSTROOT=`pwd`; cd $$CWD; \
echo =========== make fromGNUsrc for libstuff =============;\
(cd libstuff; $(MAKE) RC_CFLAGS="$(RC_CFLAGS)" \
RC_ARCHS="$(RC_ARCHS)" \
DSTROOT=$$DSTROOT fromGNUsrc); \
echo =========== make all for as =============; \
(cd as; $(MAKE) RC_CFLAGS="$(RC_CFLAGS)" \
RC_ARCHS="$(RC_ARCHS)" \
DSTROOT=$$DSTROOT all); \
fi
installsrc installGNUsrc: SRCROOT
mkdirs $(SRCROOT)
cp Makefile $(SRCROOT)
for i in `echo $(SUBDIRS)`; \
do \
echo =========== make $@ for $$i =============; \
(cd $$i; $(MAKE) SRCROOT=$$SRCROOT/$$i $@); \
done
installhdrs: $(DSTROOT)
cd include; $(MAKE) DSTROOT=$(DSTROOT) install
$(DSTROOT):
mkdirs $@
SRCROOT:
@if [ -n "${$@}" ]; \
then \
exit 0; \
else \
echo Must define $@; \
exit 1; \
fi